//
//  main.m
//  Block2
//
//  Created by cora1n on 14-8-13.
//  Copyright (c) 2014年 devwu. All rights reserved.
//

#import <Foundation/Foundation.h>
@interface Person :NSObject
//类型修饰符
-(void)testWithBlock:(void(^)(int a))block;
@end
@implementation Person
-(void)testWithBlock:(void (^)(int a))block
{
    block(10);
}
@end




int main(int argc, const char * argv[])
{
    Person * p = [[Person alloc]init];
    
    [p testWithBlock:^(int a) {
        NSLog(@"%d",a);
    }];
   
    return 0;
}

